import request from '../../request';
import * as apis from '@shared/apis';

export interface IProductUpdateParams extends Partial<Omit<apis.products.IProduct, 'id' | 'createdAt' | 'updatedAt'>> {}

export const put = async (id: string, params: IProductUpdateParams): Promise<apis.products.IProduct> => {
    const res = await request.put(`/products/${id}`, params);
    return res.data;
}; 